/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package utility;

import java.io.*;
import java.util.Vector;

/**
 *
 * @author Admin
 */
public class ManejadorArchivos {
    
    
    public String getContenidoFileString(File file) throws FileNotFoundException, IOException{
        String contenido = "";
        FileReader reader = new FileReader(file);
        BufferedReader buffer =  new BufferedReader(reader);
        String linea = "";
        while((linea = buffer.readLine()) != null){
            contenido += linea;
        }
        return contenido;
    }
    
    public Vector<String> getContenidoFileArray(File file) throws FileNotFoundException, IOException{
        Vector<String> contenido = new Vector<String>();
        FileReader reader = new FileReader(file);
        BufferedReader buffer =  new BufferedReader(reader);
        String linea = "";
        while((linea = buffer.readLine()) != null){
            contenido.add(linea);
        }
        return contenido;
    }
    
}
